// Based on example given at:
// http://www.sdltutorials.com/sdl-events by Tim Jones
// Changed return types to bool to allow capture of input events, the return value specifying if the event was captured and should not be propogated further.
// -NFigg 4/1/2013

#ifndef _EVENT_TARGET_H_
#define _EVENT_TARGET_H_

#include "SDL.h"

class EventTarget
{
public:
	EventTarget();
	~EventTarget();

	/* All event functions may return true to indicate handling the event, this should mean it doesn't need handling by anything else */
    virtual bool OnEvent(SDL_Event* Event);
    virtual bool OnInputFocus();
    virtual bool OnInputBlur();
    virtual bool OnKeyDown(SDLKey sym, SDLMod mod, Uint16 unicode);
    virtual bool OnKeyUp(SDLKey sym, SDLMod mod, Uint16 unicode);
    virtual bool OnMouseFocus();
    virtual bool OnMouseBlur();
    virtual bool OnMouseMove(int mX, int mY, int relX, int relY, bool Left,bool Right,bool Middle);
    virtual bool OnMouseWheel(bool Up, bool Down);    //Not implemented
    virtual bool OnLButtonDown(int mX, int mY);
    virtual bool OnLButtonUp(int mX, int mY);
    virtual bool OnRButtonDown(int mX, int mY);
    virtual bool OnRButtonUp(int mX, int mY);
    virtual bool OnMButtonDown(int mX, int mY);
    virtual bool OnMButtonUp(int mX, int mY);
    virtual bool OnJoyAxis(Uint8 which, Uint8 axis, Sint16 value);
    virtual bool OnJoyButtonDown(Uint8 which, Uint8 button);
    virtual bool OnJoyButtonUp(Uint8 which, Uint8 button);
    virtual bool OnJoyHat(Uint8 which, Uint8 hat, Uint8 value);
    virtual bool OnJoyBall(Uint8 which, Uint8 ball, Sint16 xrel, Sint16 yrel);
    virtual bool OnMinimize();
    virtual bool OnRestore();
    virtual bool OnResize(int w,int h);
    virtual bool OnExpose();
    virtual bool OnExit();
    virtual bool OnUser(Uint8 type, int code, void* data1, void* data2);
};

#endif